﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;

using Xc.DataAccess.Core;
using Xc.DataAccess.DataBase.DeviceInfos.Models;

namespace Xc.DataAccess.DataBase.DeviceInfos
{
    public interface IDbDeviceInfoService
    {
        /// <summary>
        /// 删除设备信息
        /// </summary>
        /// <param name="deviceid"></param>
        /// <returns></returns>
        Result Delete(string deviceid);
        /// <summary>
        /// 添加设备信息
        /// </summary>
        /// <param name="deviceInfo"></param>
        /// <returns></returns>
        Result Add(DeviceInfoAdd[] deviceInfo);
        /// <summary>
        /// 添加或更新设备信息
        /// </summary>
        /// <param name="deviceInfo"></param>
        /// <returns></returns>
        Result AddUpdate(DeviceInfoAdd[] deviceInfo);
        /// <summary>
        /// 查询设备信息
        /// </summary>
        /// <param name="callBack"></param>
        /// <returns></returns>
        ResultData<IEnumerable<DeviceInfo>> Get(Func<IQueryable<DeviceInfo>, IQueryable<DeviceInfo>> callBack);

        /// <summary>
        /// 更新设备信息
        /// </summary>
        /// <param name="deviceInfo"></param>
        /// <returns></returns>
        Result Update(params DeviceInfoAdd[] deviceInfo);
        Result PhysicallyDelete(string deviceid);
        /// <summary>
        /// 获取已删除的设备列表
        /// </summary>
        /// <returns></returns>
        ResultData<DeviceInfo[]> DeletedDevice();
    }
}
